Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/416 Added support for multiple call to actions per project. #447

Merged
merged 11 commits into from
Jun 29, 2021

Conversation

Arilith
Copy link
Contributor

@Arilith Arilith commented May 28, 2021

Description

Added support for multiple call to actions per project, with the limits and conditions discussed in #440 .

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I did not update API Controllers, if I did, I added/changed Postman tests
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I updated the changelog with an end-user readable description
  • I assigned this pull request to the correct project board to update the sprint board

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.
These steps will be used during release testing.

Add a single call to action

  1. Add a new project, by posting to "/api/Project".
  2. Make sure you only include one call to action.
  3. Make sure the "optionvalue" of the call to action is correct, look at the "CallToActionOptions" table for possible correct values.
  4. After the request succeeded, you should be able to see the project with the call to action by going to "/api/Project/"

Add Multiple call to actions

  1. Add a new project, by posting to "/api/Project".
  2. Make sure you include multiple call to actions.
  3. Make sure the "optionvalue" of all call to actions is correct, look at the "CallToActionOptions" table for possible correct values. (Preferably pick multiple different values)
  4. After the request succeeded, you should be able to see the project with the call to action by going to "/api/Project/"

Add call to action with invalid action value

  1. Add a new project, by posting to "/api/Project".
  2. Make sure you include at least one call to action.
  3. Make sure the "optionvalue" of all call to actions is incorrect, for example "INCORRECTACTION"
  4. You should receive a bad request (400) error, with an instance-id of "40EE82EB-930F-40C8-AE94-0041F7573FE9"

Add call to action with duplicate action values

  1. Add a new project, by posting to "/api/Project".
  2. Make sure you include at least two call to actions.
  3. Make sure the "optionvalue" of at least two call to actions are the same and correct, for example "Join today"
  4. You should receive a bad request (400) error, with an instance-id of "D2C8416A-9C55-408B-9468-F0E5C635F9B7"

Add more than four call to actions

  1. Add a new project, by posting to "/api/Project".
  2. Make sure you include at least five call to actions.
  3. Make sure the "optionvalue" of all call to actions are DISTINCT and CORRECT for example "Join today", "Provide feedback", "Apply now", "Collaborate with us", "More information"
  4. You should receive a bad request (400) error, with an instance-id of "E780005D-BBEB-423E-BA01-58145D3DBDF5"

Link to issue

Closes: #416

…mits for the amount of CTA's and duplicate CTA's.
@Arilith Arilith self-assigned this May 28, 2021
@Arilith Arilith mentioned this pull request May 28, 2021
13 tasks
Copy link
Member

@RubenFricke RubenFricke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good Tristan! Code looks code, it's amazing how fast you were able to get familiar with the codebase. Good job! I have one small remark (nothing spectacular). I noticed that I'm able to add 2 call to actions with the same option-value while in the create function this is not possible. Could you take a look into this please?

Overall it looks really good, keep up the good work.

Data/06_Data.csproj Outdated Show resolved Hide resolved
API/Controllers/ProjectController.cs Outdated Show resolved Hide resolved
@Arilith
Copy link
Contributor Author

Arilith commented Jun 1, 2021

Looks good Tristan! Code looks code, it's amazing how fast you were able to get familiar with the codebase. Good job! I have one small remark (nothing spectacular). I noticed that I'm able to add 2 call to actions with the same option-value while in the create function this is not possible. Could you take a look into this please?

Overall it looks really good, keep up the good work.

I will fix that as soon as possible, thanks for the remark!

@niraymak
Copy link
Member

niraymak commented Jun 7, 2021

Please note that the frontend is not yet ready for this PR to be merged. See comment: DigitalExcellence/dex-frontend#454 (comment)
I guess we should merge both PR's at the same time.

Copy link
Member

@niraymak niraymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one minor change requested!

Nice first PR 👍

Instance = "965D9C50-064F-4AFD-8CEB-28E556E47906"
};
return BadRequest(problem);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this check if there are duplicate OptionValues instead of Values? Option value is the type of call to action (e.g "Join today") and value is the url ("https://github.com/digitalexellence/dex-frontend"). Right now it's not possible to link the same page twice, I don't think that that is the behaviour we want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, as this is the second pull-request for this issue, it may be a little unclear. But in the previous PR #440 it was asked to also check for the values. So currently it's not possible to add any duplicate buttons as that could be unclear and it's not possible to add multiple of the same URL's.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think people should be able to add the same url on different buttons, maybe @RubenFricke & @niraymak can give their opinion on this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, the URL can be the same in multiple added call to actions. However, you should not be able to add 2 the same call to action (I think I also mentioned this in the other pull request, but I can't remember anything said about checking on the values). @niraymak do you have any opinions about this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. @RubenFricke

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, I'll update this today.

@Arilith Arilith changed the title Added support for multiple call to actions per project. Also added li… Feature/416 Added support for multiple call to actions per project. Jun 21, 2021
Copy link
Member

@niraymak niraymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will approve when frontend is ready for it. :)

Copy link
Member

@waltersajtos waltersajtos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just finished the front-end implementation, everything worked as expected. Good work!

@RubenFricke RubenFricke merged commit 5f693c1 into develop Jun 29, 2021
@RubenFricke RubenFricke deleted the feature/416-2-multiple-calltoactions branch June 29, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple call to actions
4 participants